<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>小飞象-订单信息-日常销售任务详情</title>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_810097_mgs6xzz1oj.css">
    <link rel="stylesheet" href="../../css/common/reset.css">
    <link rel="stylesheet" href="../../layui/css/layui.css">
    <link rel="stylesheet" href="../../css/reset-layui.css">
    <link rel="stylesheet" href="../../css/header.css">
    <link rel="stylesheet" href="../../css/common/nav.css">
    <link rel="stylesheet" href="../../css/common/aside.css">
    <link rel="stylesheet" href="../../css/common/content.css">
    <link rel="stylesheet" href="../../css/capital.css">
</head>

<body>
    <header>
        <div class="wrapper">
            <div class="clearfix headerBox">
                <h1 class="fl logo">
                    <a href="">小飞象</a>
                </h1>
                <!-- <div class="fl alipayName">支付宝充值账号: <b class="redColor">156****8656</b>开户人: <b class="redColor">陈小窝</b></div> -->
                <div class="fr logOut">退出</div>
                <div class="fr userName"></div>
            </div>
        </div>
    </header>
    <div class="mhNav">
        <ul class="navMenuBox">
            <li>
                <a href="../../index.html" class="active">
                    飞象首页
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    会员中心
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="member/basicInfo.html">基本资料</a>
                    </li>
                    <li>
                        <a href="member/storeMage.html">店铺管理</a>
                    </li>
                    <li>
                        <a href="member/readjustNum.html">调整单量</a>
                    </li>
                    <li>
                        <a href="/goodsMage.html">商品管理</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    计划管理
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="../../plan/newPlan.html">新建计划</a>
                    </li>
                    <li>
                        <a href="../../plan/planMage.html">计划管理</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    订单管理
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="../orderMage/dailyTaskDes.html">订单管理</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    资金管理
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="../inAccout.html">账号充值</a>
                    </li>
                    <li>
                        <a href="../transferMage.html">转账管理</a>
                    </li>
                    <li>
                        <a href="dailyTaskDes.html">订单信息</a>
                    </li>
                    <li>
                        <a href="../expressForm.html">获取快递底单</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="">在线客服</a>
            </li>
        </ul>
    </div>
    <div class="clearfix wrapper mainBomContent">
        <div class="asideMenu">
            <h2 class="title">
                <i class="iconfont icon--"></i> 资金管理
            </h2>
            <ul>
                <li>
                    <a href="../inAccout.html">账号充值</a>
                </li>
                <li>
                    <a href="../transferMage.html">转账管理</a>
                </li>
                <li class="active">
                    <a href="dailyTaskDes.html">订单信息</a>
                </li>
                <li>
                    <a href="../expressForm.html">获取快递底单</a>
                </li>
            </ul>
        </div>
        <div class="rightContent">
            <div class="orderMsgView">
                <div class="tabNav">
                    <a href="dailyTaskDes.html" class="active">日常销售任务</a>
                    <!-- <a href="appointTaskDes.html">指定任务</a>
                    <a href="repurchTaskDes.html">复购任务</a> -->
                </div>
                <p class="redColor"> 此表格用于记录所有销量任务已支付的订单信息。系统只保留近50天的数据。</p>
                <form action="">
                    <div class="filterBox">
                        <div class="fl">
                            统计时间：<input class="laydate-icon" id="BeginDate" maxlength="16" name="BeginDate" type="text"
                                value=""> ~
                            <input class="laydate-icon" id="EndDate" maxlength="16" name="EndDate" type="text" value="">
                        </div>
                        <input type="submit" value="查询" class="btn queryBtn">
                        <input type="button" value="导出" class="btn exportBtn">
                    </div>
                </form>
                <table class="layui-table">
                    <colgroup>
                        <col width="100">
                        <col width="110">
                        <col width="90">
                        <col width="">
                        <col width="">
                        <col>
                        <col>
                        <col width="90">
                        <col width="90">
                        <col>
                    </colgroup>
                    <thead>
                        <tr>
                            <th>任务号</th>
                            <th>订单编号</th>
                            <th>商品简称</th>
                            <!-- <th>掌柜号</th> -->
                            <!-- <th>商品ID</th> -->
                            <!-- <th>任务类型</th> -->
                            <th>关键字</th>
                            <!-- <th>实际金额</th> -->
                            <th>支付时间</th>
                        </tr>
                    </thead>
                    <tbody id="orderInfo">
                        <tr>
                            <!-- <td>V6158033843</td>
                            <td class="wordBreak">210257580671482283</td>
                            <td>灯先生 黑白吊灯</td> -->
                            <!-- <td>灯先生旗舰店</td> -->
                            <!-- <td class="wordBreak">525323759964</td> -->
                            <!-- <td>淘宝APP自然搜索</td> -->
                            <!-- <td>餐厅灯 吊灯 现代简约</td> -->
                            <!-- <td>239.00</td> -->
                            <!-- <td>2018/8/30 18:44:10</td> -->
                        </tr>
                    </tbody>
                </table>
                <div class="loadMore">
                    <button id="loadMore">加载更多</button>
                </div>
            </div>
        </div>
    </div>
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/jquery.cookie.js"></script>
    <script src="../../js/timechange.js"></script>
    <script src="../../layui/layui.js"></script>
    <script src="../../js/dataRequest.js"></script>
    <script>
        var mid = $.cookie('id');
        if (mid == null || mid == "" || !mid || mid == undefined) {
            window.location.href = "/login.html";
        }
        $(".mhNav .navMenuBox > li > a").click(function (event) {
            if ($(this).siblings('ul').is(':visible')) {
                $(this).siblings('ul').stop(true, true).slideUp();
                $(this).removeClass('active')
            } else {
                $(this).siblings('ul').stop(true, true).slideDown().parents('li').siblings().find('ul').stop(
                    true, true).slideUp();
                $(this).addClass('active').parents('li').siblings().find('a').removeClass('active');
            }
        });
        // 请求订单数据
        $.ajax({
            url: BASE_URL + MAP_URL + 'order/1/10/',
            type: 'GET',
            dataType: 'json',
            contentType: "application/json;charset=utf-8",
            // data: JSON.stringify(JdateJson),
            success: function (data) {
                console.log("订单数据:", data.data.list)
                // return;
                var _Success = data.code;
                if (_Success == 200) {
                    var str = "";
                    for (var i = 0; i < data.data.list.length; i++) {
                        console.log("到这里来了么");
                        var _orderList = data.data.list;
                        str = '<tr>';
                        str += '<td>' + _orderList[i].task_num + '</td>';
                        str += '<td class="wordBreak">' + _orderList[i].order_number + '</td>';
                        str += '<td>' + _orderList[i].shop_name + '</td>';
                        str += '<td>' + _orderList[i].word + '</td>';
                        str += '<td>' + $.time.getTime(_orderList[i].create_time, '', '/') + '</td>';
                        str += '</tr>';
                    }
                    $("#orderInfo").append(str);
                    // layer.msg("提交成功");
                } else {
                    // return;
                    layer.msg(data.data);
                }
            }
        });
    </script>
    <script>
        layui.use(['layer', 'laydate'], function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '#BeginDate',
                type: 'datetime',
                istime: true,
                format: 'yyyy-MM-dd HH:mm'
            });
            laydate.render({
                elem: '#EndDate',
                type: 'datetime',
                istime: true,
                format: 'yyyy-MM-dd HH:mm'
            });
        });
        $.ajax({
            type: "get",
            url: "http://47.92.174.143:8888/v1/client/merchants/" + mid,
            dataType: 'json',
            success: function (data) {
                // console.log("请求数据为", data.data)
                // 存储总额
                if (data.data == null || !data.data) {
                    layer.msg('数据出错,请重新登录', {
                        icon: 5,
                        time: 6000,
                        end: function () {
                            location.href = '/login.html';
                        }
                    });
                } else {
                    $(".userName").html(data.data.loginId);
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) { }
        });
    </script>
</body>

</html>